package top.kaoshanji.r1ch05c;

import org.junit.Assert;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

/**
 * @author kaoshanji
 * ^_^
 * create time 2025/5/6 17:18
 */
public class CustomSchemaTest {

    public ApplicationContext context;

    @BeforeClass
    public void setUp() {
        context = new ClassPathXmlApplicationContext("r1ch05c/custom.xml");
    }

    /**
     * 代码清单test-r1ch05c-02：测试自定义标签注册Bean
     */
    @Test
    public void registerBean() {
        Object userService = context.getBean("userService");
        Assert.assertNotNull(userService);
    }

}
